Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

HCL Notes/Domino 8.5 Forum (includes Notes Traveler)

Previous Next

Code and configuration

Configuration:
jt400 - you can use David's solution
or add to notes.ini line
JAVAUSERCLASSES=libpath


xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Code:
It works for years
public class IndexTarnsfer extends AgentBase {

public void NotesMain() {

String[] configParams = {param1,param2, param3};
Configuration config ;
SimpleLogger nlogger ;
NsfController dc ;
RdbController rc ;
TransferBean index ;

long counter= 0 ;
String logMsg = "";
String startMessage = "Start processing Time=";


NsfConfigFactory configFactory = new NsfConfigFactory();

try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();


config = configFactory.getNsfConfiguration(session,configParams );
nlogger = new NsfLogger(session , config);

startMessage = startMessage + DateTimeHelper.getCurrentDateTime();
dc = new NsfController(session , config, nlogger);
rc = new RdbController(config, nlogger);

index = dc.getIndex() ;
while(index.isValid() ){
logMsg = rc.insertIndex(index);

if(rc.isInserted()){
dc.commit() ;
rc.resetStatus();
}
counter++ ;
index = dc.getIndex() ;

}
startMessage=startMessage +"; End processing Time=" + DateTimeHelper.getCurrentDateTime();
nlogger.runLog( startMessage + "; Processed=" + counter);


rc.closeConnection();


} catch(Exception e) {
e.printStackTrace();
}
}
}

and In the rdb processing class create method
public void closeConnection(){
//Connection conn
//Statement stmt

try{
stmt.close();
conn.close();
}catch(SQLException e){
//some action
}

}


Feedback response number WEBB7YCMCJ created by ~Mary Xanjipyburoopsi on 12/02/2009

Using JTOpen / JT400 in agents (~Kelly Ekfookon... 1.Dec.09)
. . Solution found (~Kelly Ekfookon... 2.Dec.09)
. . . . This is still flaky (~Kelly Ekfookon... 2.Dec.09)
. . Close Connection (~Mary Xanjipybu... 1.Dec.09)
. . . . More code (~Kelly Ekfookon... 1.Dec.09)
. . . . . . Do not recycle your session (~Mary Xanjipybu... 1.Dec.09)
. . . . . . . . This doesn't seem to make any diffe... (~Kelly Ekfookon... 2.Dec.09)
. . Don't import the jt400 jar (~Dexter Zengero... 2.Dec.09)
. . . . That's interesting (~Kelly Ekfookon... 2.Dec.09)
. . . . That seems to work OK. (~Kelly Ekfookon... 3.Dec.09)
. . Code and configuration (~Mary Xanjipybu... 2.Dec.09)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS